/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DAO;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

/**
 *
 * @author Valentin
 */

/**
 * Classe mere dont hérite les DAO
 * @author Valentin
 * @param <T> 
 */
public abstract class DAO<T> {
    protected Connection connexion;
    protected ResultSet queryResult;
    protected Statement state;
    
    public DAO(Connection con){
        connexion = con;       
        try {
            state = connexion.createStatement();
            state.executeQuery("USE gestionstock");
        } catch (SQLException ex) {
            System.out.println("Impossible de se connecter à la base de donnée");
        }
    }    
    public void insert(T t)throws SQLException{     
        
    }
    
    public void delete(T t)throws SQLException{     
        
    }
    
    public void update(T t)throws SQLException{     
        
    }
}